<pre class="docs-method-signature"><code>path.pointAtLength(length [, opt])</code></pre>
<p>Return a point on the path that lies <code>length</code> away from the beginning of the path.</p>

<p>If negative <code>length</code> is provided, the algorithm starts looking from the end of the path. If <code>length</code> is higher than path length, the closest visible path endpoint is returned instead. Invisible segments (e.g. Moveto segments) have no length and are therefore skipped by the algorithm. If the path contains no visible segments, the <code>end</code> point of the last segment is returned. If the path has no segments at all, <code>null</code> is returned.</p>

<p>One visible segment is identified which contains the point at <code>length</code>. Finding the desired point is straightforward for linear segments (see <code>line.pointAtLength()</code> <a href="#g.Line.prototype.pointAtLength">for reference</a>). Finding the desired point in curved segments is more complex, as illustrated by the <code>curve.pointAtLength()</code> <a href="#g.Curve.prototype.pointAtLength">function</a>.

<p>The <code>opt</code> argument is optional. Two properties may be specified, <code>opt.precision</code> and <code>opt.segmentSubdivisions</code>, which determine maximum error allowed in <code>pointAtLength</code> <a href="#g.Curve.prototype.pointAtLength">calculations</a> for curved segments (default precision is 3; this corresponds to maximum observed error of 0.1%). The <code>opt.segmentSubdivisions</code> property is an array of individual segments' <a href="#g.Curve.prototype.getSubdivisions">subdivision arrays</a>. The <code>path.getSegmentSubdivisions()</code> <a href="#g.Path.prototype.getSegmentSubdivisions">function</a> may be used to obtain the <code>segmentSubdivisions</code> array. The <code>opt.precision</code> property is still necessary, however; it determines the precision of the point search algorithm in curved segments.</p>
